@mixin clamp($num: 2) {
  overflow: hidden;
  /*超出隐藏*/
  text-overflow: ellipsis;
  /*文本溢出时显示省略标记*/
  display: -webkit-box;
  /*设置弹性盒模型*/
  -webkit-line-clamp: $num;
  /*文本占的行数,如果要设置2行加...则设置为2*/
  -webkit-box-orient: vertical;
  /*子代元素垂直显示*/
}

//实体箭头
@mixin triArrow($direction, $size, $color) {
  width: 0;
  height: 0;
  line-height: 0;
  font-size: 0;
  overflow: hidden;
  border-width: $size;
  cursor: pointer;

  @if $direction==top {
    border-style: dashed dashed solid dashed;
    border-color: transparent transparent $color transparent;
    border-top: none;
  }

  @else if $direction==bottom {
    border-style: solid dashed dashed dashed;
    border-color: $color transparent transparent transparent;
    border-bottom: none;
  }

  @else if $direction==right {
    border-style: dashed dashed dashed solid;
    border-color: transparent transparent transparent $color;
    border-right: none;
  }

  @else if $direction==left {
    border-style: dashed solid dashed dashed;
    border-color: transparent $color transparent transparent;
    border-left: none;
}
}